package com.socialrss.accounts;

import java.util.Locale;

import com.socialrss.constants.SocialNetworkNames.SocialNetKeys;

/*
* author : Sefa Sahin Koc
*/
public abstract class AbstractHolder {
	private String holdername;					//name of holder
	private boolean turnedon;					//its notification is turned on or not
	private int id;								//id of this holder in database
	private int parentid;
	

	public AbstractHolder(int id){
		this.id = id;
		this.parentid = -1;
	}
	public int getParentId(){
		return parentid;
	}
	public void setParentId(int parentid){
		this.parentid = parentid;
	}
	public String getName() {
		return holdername;
	}
	public void setName(String name) {
		this.holdername = name;
	}
	public boolean isTurnedOn() {
		return turnedon;
	}
	public void setTurnedOn(boolean turnedon) {
		this.turnedon = turnedon;
	}
	public int getId(){
		return id;
	}
	public void setId(int id){
		this.id = id;
	}
	public boolean isGroup(){
		return false;
	}
	public SocialNetKeys getConntype() {
	  return SocialNetKeys.group;
	}
	public boolean connNameContains(String temp){
		 return (holdername.toLowerCase(Locale.getDefault())).contains(temp.toLowerCase(Locale.getDefault()));
	}
}

